package cn.eoeit.alone.phoneImport.util;

import android.content.Context;
import android.content.SharedPreferences;

/**
 * @author hj
 * @version 创建时间：2013-12-19 下午8:44:25
 * 说明：
 */

public class PreferenceUtil {

	public static void saveStrValue(Context context, String name,
			String value) {
		SharedPreferences preferences=context.getSharedPreferences(Constants.SHARENAME,Context.MODE_WORLD_WRITEABLE );
		preferences.edit().putString(name, value).commit();
	}

	public static String getStrValue(Context context,String key,String defValue) {
		SharedPreferences preferences=context.getSharedPreferences(Constants.SHARENAME,Context.MODE_WORLD_WRITEABLE );
        return preferences.getString(key, defValue);
	}

}
